
/* File name	: adc.h
 * Project 		: BKIT MCR
 * Version 		: 1.0
 * Creation Date: 07/07/2010
 * Tabsize		: 4
 * Author  		: BKIT4U                   
 * Copyright	: (c) 2010 BKIT HARDWARE CLUB - www.bkit4u.com
 * License		: Free.
 * Comments		: 
 * 
 */

#ifndef	__ADC_H__
#define __ADC_H__

/*====================================*/
/* Constant setting           		  */
/*====================================*/
#define ADC_VREF_TYPE 		0x60 // 0110 0000: AVCC with external capacitor at AREF pin.
								 // left_adjust.
#define	WHITE	0
#define	BLACK	1

/*====================================*/
/* extern variable declaration		  */
/*====================================*/
extern unsigned char sensor;

/*====================================*/
/* Prototype declaration      		  */
/*====================================*/
void adc_init();								// Configuration of hardware setting
unsigned char read_adc(unsigned char adc_input);
void read_sensor();								
void save_sensor(unsigned char color);
void lcd_putSensor(unsigned char color);
void update_vcompare();							// update v_compare

void read_vcompare();							// read v_compare form eeprom
void write_vcompare();							// write v_compare into eeprom


#endif



/****************END FILE**************/

